import request from "@/utils/request";
/**
 * 品种列表
 * @param {*} data
 * @returns
 */
export function API_varietyList(params) {
  return request({
    url: "/variety/list",
    method: "get",
    params,
  });
}

/**
 * 品种新增
 * @returns
 */
export function API_varietyCreate(data) {
  return request({
    url: "/variety/create",
    method: "post",
    data,
  });
}

/**
 * 品种修改
 * @returns
 */
export function API_varietyEdit(data) {
  return request({
    url: `/variety/edit/${data.code}`,
    method: "put",
    data,
  });
}

/**
 * 品种删除
 * @returns
 */
export function API_varietyDelete(data) {
  return request({
    url: `/variety/delete/${data.code}`,
    method: "delete",
  });
}

/**
 * 品种记录
 * @returns
 */
export function API_varietyGet(params) {
  return request({
    url: "/variety/get",
    method: "get",
    params,
  });
}

/**
 * 疫苗计划列表
 * @returns
 */
export function API_varietyVaccine(params) {
  return request({
    url: `/variety/vaccine/${params.batchCode}`,
    method: "get",
    params,
  });
}

/**
 * 喂养计划列表
 * @returns
 */
export function API_varietyFeea(params) {
  return request({
    url: `/variety/feed/${params.batchCode}`,
    method: "get",
    params,
  });
}

/**
 * 喂养计划列表
 * @returns
 */
export function API_varietyQuery(params) {
  return request({
    url: `/variety/query`,
    method: "get",
    params,
  });
}
